![]() |
PATH![]() |
At times you may want two or more applets to share information. To do so, the applets must share the same applet page. Applets instantiated in the same page share the same class loader (and therefore the same static variables). The following functions let you create or remove applet pages and instantiate AWT contexts (and therefore applets) within them.
OSStatus JMNewAppletPage (
JMAppletPageRef* page,
JMSessionRef session);
Applets instantiated within the same page share the same static variables, so they may share information between them.
OSStatus JMDisposeAppletPage (JMAppletPageRef page);
Creates an AWT context within an applet page.
OSStatus JMNewAWTContextInPage (
JMAWTContextRef* context,
JMSessionRef session,
JMAppletPageRef page,
const JMAWTContextCallbacks* callbacks,
JMClientData data);
The
JMNewAWTContextInPage
function operates the same as the
JMNewAWTContext
function, but the instantiated AWT context is associated with an applet page. You can instantiate multiple AWT contexts within an applet page and all the applets within them can share static variables.